﻿using OASystem.BLL.IService;
using OASystem.BLL.Service;
using OASystem.Model;
using OASystem.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;
using System.Web.Mvc;

namespace OASystem.Controllers
{
    public class MyFileController : Controller
    {
        //private IDossier_myService dossier_MyService;
        //public MyFileController(IDossier_myService myService)
        //{
        //    dossier_MyService = myService;
        //}
        //// GET: MyFile
        //public ActionResult Index()
        //{
        //    return View();
        //}
        //public JsonResult AddFile(Myfile myfile)
        //{
        //    Operate operate = new Operate();
        //    operate.Success = dossier_MyService.Add(myfile);
        //    return Json(operate);
        //}
        //[HttpGet]
        //public JsonResult ShowFile()
        //{
        //    List<Myfile> myfiles = null;
        //    Expression<Func<Myfile, bool>> whereLambda = a => a.UserId == AdminContext.context.adminUser.UserId;
        //    if (dossier_MyService.QueryList(whereLambda) != null)
        //    {
        //       ViewBag.Datas = dossier_MyService.QueryList(whereLambda);
        //    }
        //    return Json(myfiles,JsonRequestBehavior.AllowGet);
        //}
        //public JsonResult DelFile(string id)
        //{
        //    int[] ids ;
        //    string[] strarray = id.Split(',');
        //    ids = Array.ConvertAll(strarray, int.Parse);
        //    Operate operate = new Operate();
        //    operate.Success= dossier_MyService.BatchDeleteById(ids);
        //    return Json(operate);
        //}
    }
}